package com.jf.spring.aop;

import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:22954
 * Date:2024-10-24
 * Time:15:02
 */
@Component
public class SmartCal implements Calculate{
    @Override
    public double add(double a, double b) {
        double result = a + b;
        //int i = 10/0;
        System.out.println("方法内部运行 -- result: " + result);
        return result;
    }

    @Override
    public double add(double a, double b, double c) {
        double result = a + b + c;
        System.out.println("方法内部运行 -- result: " + result);
        return result;
    }

    @Override
    public double sub(double a, double b) {
        double result = a - b;
        System.out.println("方法内部运行 -- result: " + result);
        return result;
    }
}
